1. Field of the Invention
This invention relates to timing circuits, and more specifically, to a clock circuit for digital circuits.
2. Description of Related Art
Many electronic circuits process timing or frequency information. Examples of such circuits are real time clock circuits, timer circuits, frequency counter circuits, and function generator circuits. Crystal oscillators are widely used to provide a periodic timing signal to such electronic circuits to provide a timing or frequency reference which is necessary for such electronic circuits. Similarly, most digital circuits, particularly sequential circuits, also utilize such a time reference or frequency reference.
A typical crystal oscillator circuit is depicted in FIG. 1. Crystal input 150 is coupled to the input of gain block 100, which is typically a negative gain block implemented by a CMOS or NMOS inverter, and whose output is coupled to crystal output 160. The crystal input 150 and crystal output 160 are often referred to as "Xi" and "X2", respectively, on a variety of commercially available devices. A feedback resistor 106, which serves to bias the gain block 100 in a linear, high-gain region of operation, and a crystal 108 are each connected between the crystal input 150 and the crystal output 160. The value of feedback resistor 106 is typically within the range from 50 k ohms to 1M ohm. A capacitor 102 is connected between the crystal input 150 and a power supply terminal 110, and a capacitor 104 is similarly connected between the crystal output 160 and the power supply terminal 110. Capacitors 102 and 104 are each typically several picofarads. The crystal output 160 is coupled directly or by one or more buffering stages (not shown) to a clock output 180, which is coupled to the electronic circuits that utilize the periodic timing signal generated on the clock output 180.
In operation, the oscillator circuit of FIG. 1 oscillates at a frequency determined by the resonant frequency of the crystal 108 and provides a periodic digital output signal at that frequency to clock output 180. This signal is typically amplified or buffered and distributed to a variety of individual circuit blocks.
Often the timing or frequency reference to the oscillator circuit is provided by another electronic circuit rather than by a crystal. As shown in FIG. 2, an external periodic logic signal, generated by circuit 200, is coupled to the crystal input 150 and provides the timing reference instead of a crystal 108, which is absent in the configuration shown in FIG. 2. In this operation, gain block 100 operates as a digital inverter when driven by a sufficiently high amplitude signal, such as a CMOS or TTL level logic signal, and the clock output 180 provides a periodic timing signal as before to the variety of circuit blocks connected to clock output 180.
Often it is useful to know whether the timing reference of the oscillator circuit is provided by a crystal or by an external periodic logic signal. For instance, if the circuit is configured as in FIG. 2 where an external periodic logic signal provides the timing reference, and where gain block 100 operates as a digital inverter, the feedback resistor 106 is unnecessary for proper functionality and consumes unnecessary power. Such power dissipation can be reduced if the feedback resistor 106 is removed from its feedback path. As another example, certain modes of operation of a digital circuit may depend upon the source of the timing reference, such as when a circuit must synchronize its operation with other circuits sharing the same timing reference.
However, since the oscillator will not be biased for self-oscillation if the feedback resistor 106 is removed from the feedback path, any decision circuitry must be carefully designed to provide the feedback path unless the presence of an external logic signal timing reference can be firmly established.